package 队列;
import java.util.Random;
public class test1 {
    public static void main(String[] args) throws Exception {
        int num;
        CirQueue c = new CirQueue(12);
        //存进10位随机数到队列里
        for (int i = 0; i < 10; i++) {
            c.append(new Random().nextInt(100)+1);
        }
        c.print();//打印
        //创建链式队列的实例化
        链式队列 li1 = new 链式队列();
        链式队列 li2 = new 链式队列();
        //分离队列的数字
        for (int i = 0; i < c.rear; i++) {
            num=(int)c.delete();
            if (num%2==0){
                li1.append(num);
            }else{
                li2.append(num);
            }
        }
        //打印链式队列
        System.out.println();
        li1.print();
        li2.print();
    }
}
